/**
* @Description: WoShop商城
* @Author: 梧桐
* @Copyright: 武汉一一零七科技有限公司©版权所有
* @Link: www.wo-shop.net
* @Contact: QQ:2487937004
*/
<template>
<view class="index_class">
    <view class="cont-order">
        <!-- <div class="tip flex" v-if="cartsureInfo.assem_zt.is_show == 1">
          <i class="iconfont">&#xe603;</i>
          <span>开团24小时内拼团成功，商家发货；若人数不足，系统自动退款关单；</span>
        </div> -->

        <view class="goods_type" v-if="is_mail && check">
            <view class="goods_type_title" @click="goodsTypeMethod(1)">
                <view :class="goods_type == 1 ?'goods_type_name active' : 'goods_type_name'">同城配送</view>
                <view class="goods_type_active" v-if="goods_type == 1"></view>
            </view>
            <view class="goods_type_title" @click="goodsTypeMethod(2)">
                <view :class="goods_type == 2 ?'goods_type_name active' : 'goods_type_name'">门店自提</view>
                <view class="goods_type_active" v-if="goods_type == 2"></view>
            </view>
        </view>

        <view class="phone" @click="getnav('/pagesB/my/address?isconfirm=true')" v-if="goods_type==1">
            <i class="iconfont icon_e712"></i>
            <view class="tap_address" v-if="address">
                <view class="flex-align">
                    {{ address.contacts }}
                    <text class="u-m-l-10">{{ address.phone }}</text>
                </view>
                <text>{{ address.province }}{{ address.city }}{{ address.area }} {{ address.address }}</text>
            </view>
            <view class="tap_address" v-else>{{ $t('添加收货地址') }}</view>
            <i class="iconfont icon_e60c phone-iconfont"></i>
            <image class="p_bottom" src="/static/images/img/address_img.png"/>
        </view>


        <view class="per-lists" v-if="goods_type==2">
            <!-- @click="getnav('/pagesB/my/ModifynickName')" -->
            <view class="items">
                <i class="iconfont icon_e655"></i>
                <view style="width:90%">
                    <input type="text" v-model="username" :placeholder="$t('请输入用户名')"/>
                </view>
            </view>
            <view class="items">
                <i class="iconfont icon_e682"></i>
                <view style="width:90%">
                    <input type="text" v-model="phone" :placeholder="$t('请输入手机号')"/>
                </view>
            </view>
        </view>

        <view v-for="(goodtime,keys) in goodinfo" :key="keys">
            <view class="fresh_list">
                <view class="fresh-name">
                    <i class="iconfont" style="margin-right: 5px;">&#xe735;</i>
                    {{ goodtime.goodres[0].shop_name }}
                </view>


                <view class="order_list" @click="coupon(3,goodtime.shop_store)" v-if="goods_type == 2">
                    <view class="juan">
                        <text class="order_list_left_title">{{ $t('选择自提点') }}({{ goodtime.shop_store.length }})
                        </text>
                    </view>
                    <i class="iconfont icon_e60c order_color"></i>
                </view>

                <view class="zt-wrap"
                      style="border-bottom: 1px solid #efefef; padding: 5px 10px; display: block; font-size: 12px; color: #333333;margin-top: -15px;"
                      v-if="goods_type == 2 && selectShopInfo">
                    <view style="display: flex;">
                        <view style="margin-right: 15px;">
                            <image :src="selectShopInfo['logo']" style="width: 50px;height: 50px;border-radius: 50%;"/>
                        </view>
                        <view>
                            <view class="zt-row1">{{ selectShopInfo['name'] }}
                            </view>
                            <view>
                                {{ selectShopInfo['contact'] }}/{{ selectShopInfo['phone'] }}
                            </view>
                            <view class="zt-row2">
                                {{ selectShopInfo['province'] }}{{ selectShopInfo['city'] }}{{ selectShopInfo['area'] }}
                                {{ selectShopInfo['detail'] }}
                            </view>

                        </view>
                    </view>
                </view>


                <view v-for="(time,index) in goodtime.goodres" :key="index">
                    <image class="fresh_img" :src="time.thumb_url"/>
                    <view class="fresh_banner">
                        <!-- <view class="fresh_tip">好多绿蔬菜</view> -->
                        <view class="fresh_text">{{ time.goods_name }}</view>
                        <text class="attr_color">{{ time.goods_attr_str }}</text>
                        <view class="address">
                            <view v-if="cartsureInfo.ac_type != 2" class="pirve">
                                {{ $t('¥') }}{{ time.shop_price }}
                                <text>/{{ $t('件') }}</text>
                            </view>
                            <view v-if="cartsureInfo.ac_type == 2" class="pirve">
                                {{ $t('积分') }}{{ time.shop_price['integral'] }}{{ $t('个') }}+{{
                                $t('¥')
                                }}{{ time.shop_price['price'] }}
                                <text>/{{ $t('件') }}</text>
                            </view>


                        </view>
                        <view class="shop">{{ $t('购买数量') }}:{{ time.goods_num }}</view>
                    </view>
                </view>
            </view>

            <view class="adds_list">
                <view @click="coupon(1,goodtime)">
                    <text>{{ $t('优惠券') }}</text>
                    <view>
                        ¥ {{ goodtime.youhui_price }} <span></span>
                        <i class="iconfont icon_e60c"></i>
                    </view>
                </view>

                <view @click="coupon(2,goodtime)" v-if="goods_type == 1">
                    <text>{{ $t('运费') }}</text>
                    <view>
						<!-- 同城购物车满减包邮 -->
						<!-- {{goodtime}} -->
						<view v-if="tcType == 3 && goodtime.xiaoji_price2 >= cartFree">
							¥ {{ $t('0.00') }}<span class="cfree">(满{{cartFree}}包邮)</span>
							<i class="iconfont icon_e60c"></i>
						</view>
						<view v-if="tcType == 3 && goodtime.xiaoji_price2 < cartFree">
							¥ {{ goodtime.freight }} {{ goodtime.freight == 0 ? $t('包邮') : '' }}
							<i class="iconfont icon_e60c"></i>
						</view>
						<view v-if="tcType != 3">
							¥ {{ goodtime.freight }} {{ goodtime.freight == 0 ? $t('包邮') : '' }}
							<i class="iconfont icon_e60c"></i>
						</view>
                    </view>
                </view>

              <view @click="coupon(2,goodtime)" v-if="goods_type == 2">
                <text>{{ $t('运费') }}</text>
                <view>
                  ¥ {{ goodtime.zt_price || 0.00  }}
                  <i class="iconfont icon_e60c"></i>
                </view>
              </view>
                <view>
                    <text>{{ $t('总计') }}</text>
                    <view>
                        ¥ {{ goodtime.xiaoji_price }}
                        <i class="iconfont icon_e60c" style="color:transparent!important"></i>
                    </view>
                </view>
				<!-- <view @click="coupon(4,goodtime)">
				  <text>{{ $t('备注') }}</text>
				  <view>
					  <div id="ellipsis-text">
						 <text v-if="infoCoupon.beizhu == undefined || infoCoupon.beizhu == ''" class="bztx">请添加备注</text>
						 <text v-else-if="goodtime.dianpu_id == infoCoupon.dianpu_id">{{ infoCoupon.beizhu }}</text>
					  </div>
					  <i class="iconfont icon_e60c"></i>
				  </view>
				</view> -->
				
				<view>
				  <text>{{ $t('备注') }}</text>
				  <view class="text-box">
					      <input type="text"
					             :placeholder="$t('请添加备注(100字以内)')"
					             v-model="goodtime.beizhu"
					             maxlength="100">
					  
				  </view>
				</view>
            </view>
        </view>
        <u-popup ref="popupCopun" mode="bottom" border-radius="12">
            <view class="popup-coupon" v-if="pop == 1">
                <view class="popup-title">{{ $t('优惠券') }}</view>
                <view class="coupon-list">
                    <view class="cuxiao">
                        <text class="title">{{ $t('优惠券') }}</text>
                        <view class="content">
                            <!-- <view style="font-size:22upx">safgasfsd</view> -->
                            <view style="color:#999;font-size:22upx">
                                {{ infoCoupon.coupon_str ? infoCoupon.coupon_str : $t('暂无优惠信息') }}
                            </view>
                        </view>
                        <i class="iconfont"></i>
                    </view>
                    <view class="cuxiao" v-if="infoCoupon.cxhuodong?infoCoupon.cxhuodong.length>0:0">
                        <text class="title">{{ $t('促销') }}</text>
                        <view class="content">
                            <view style="color:#999;font-size:22upx;margin-bottom:20upx;"
                                  v-for="(cou,index9) in infoCoupon.cxhuodong" :key="index9">{{ cou }}
                            </view>
                        </view>
                        <i class="iconfont"></i>
                    </view>
                </view>

                <view class="popup-com">
                    <button @click="hidePopup">{{ $t('完成') }}</button>
                </view>
            </view>

            <view class="popup-coupon" v-if="pop == 2">
                <view class="popup-title">{{ $t('配送方式') }}</view>
                <view class="coupon-list">
                    <view class="cuxiao">
                        <text class="title"> {{ $t('配送') }}</text>
                        <view class="content">
                            <!-- <view style="font-size:22upx">safgasfsd</view> -->
                            <view style="color:#999;font-size:22upx">{{ infoCoupon.freight_str }}</view>
                        </view>
                        <i class="iconfont"></i>
                    </view>
                </view>

                <view class="popup-com">
                    <button @click="hidePopup">{{ $t('完成') }}</button>
                </view>
            </view>


            <view class="popup-coupon" v-show="pop==3">
                <view class="popup-title">{{ $t('店铺自提点') }}</view>

                    <view class="coupon-list " >
                        <scroll-view scroll-y style="height:460px;">

                        <view class="guarantee"
                              style="align-items: center;border-bottom: 1px solid #efefef;padding-bottom: 15px;"
                              v-for="(shopStore,index) in infoCoupon" :key="index"
                              @click="selectShop(shopStore)"
                        >
                            <view>
                                <image :src="shopStore.logo" style="width: 50px;height: 50px;border-radius: 50%;"/>
                            </view>
                            <view class="guar-cont">
                                <view>{{ shopStore.name }}</view>
                                <view style="color:#999;margin-top:10rpx;">{{ shopStore.province }}
								{{ shopStore.city }}{{ shopStore.area }}{{ shopStore.address_detail }}
                                </view>
                                <!-- <view style="color:#666;margin-top:10rpx;">距离您当前{{ shopStore.distance }}km</view> -->
                            </view>
                            <i class="iconfont icon_e60c " style="color: #999999;"></i>

                        </view>
                            <view style="height: 50px;"></view>
                        </scroll-view>

                    </view>

                <!--					<view class="popup-com">-->
                <!--						<button @click="hidePopup">{{$t('确定')}}</button>-->
                <!--					</view>-->
            </view>
			
			<view class="popup-coupon" v-if="pop == 4">
			    <view class="popup-title">{{ $t('添加备注') }}</view> 
			    <view class="coupon-list">
			        <view class="cuxiao">
			            <view class="content">
							 <textarea
							      class="textarea"
							      placeholder="请输入内容"
							      maxlength="150"
							      v-model="bzDesc"
							    />
			            </view>
			            <i class="iconfont"></i>
			        </view>
			    </view>
			
			    <view class="popup-com">
			        <button @click="hidePopup2()">{{ $t('完成') }}</button>
			    </view>
			</view>

        </u-popup>
        <view class="amountFooter">
			
            <p v-if="cartsureInfo.ac_type != 2" class="left">
                <text>{{ $t('￥') }}</text>
                <text class="price">{{ cartsureInfo.zsprice }}</text>
            </p>
            <p v-if="cartsureInfo.ac_type == 2" class="left">
                <text>{{ $t('积分') }}</text>
                <text class="price">{{ cartsureInfo.integral }}</text>
                <text>{{ $t('个') }}+{{ $t('￥') }}</text>
                <text class="price">{{ cartsureInfo.zsprice }}</text>
            </p>
            <u-button hair-line ripple :custom-style="customStyle" style="width:240upx" shape="circle"
                      @click="submitOrder">{{ $t('提交订单') }}
            </u-button>

        </view>
    </view>

    <pay-pop ref="payPop" :callbackUrl="'/pagesC/order/allOrder?index=6'" :isLinkTo="true"
             :totalPrice="Number(cartsureInfo.zsprice).toFixed(2)" :integral="cartsureInfo.integral">
        <div class="pay-btn" @click="$u.throttle(crosspay,1500)">{{ $t('确认支付') }}</div>
    </pay-pop>
    <u-toast ref="uToast"/>

</view>
</template>

<script>
let cart_idresList = ""; // 购物车商品id
let paydataYue = ""; // 提交商品订单
let orderInfoData = {};
import payPop from "@/pagesC/components/payPop";

export default {
    data() {
        return {
            infoCoupon: {},
            cartsureInfo: {},
            address: "", // 收货地址
            goodinfo: {},
            pop: 1,
            valShow: false,
            valueStatus: 0, // 更新页面状态 防止页面卡死
            params: null,
            wechatMiniProgram: 0,
            h5: 0,
            totalPrice: "0.00",
            customStyle: {
                'backgroundImage': 'linear-gradient(to right, #ffa468, #fa3f3f)',
                'color': '#fff',
                'margin': '0',
                'fontSize': '24upx'
            },

            goods_type: 0,
            is_mail: 0,//是否是邮寄商品
            check: 0,//门店配送商品
            username: '',
            phone: '',
            selectShopInfo: null,
			tcType: 0,//同城类型
			tcPrice: 0,//同城商品价格
			cartFree: 0,//同城购物车满减价格
			bzDesc: ''//备注
        };
    },
    components: {
        payPop
    },
    onShow() {
        paydataYue = "";
        if (this.$store.state.confirmAddress) {
            this.address = this.$store.state.confirmAddress;
        }
    },
    onLoad(opiton) {
        //#ifdef MP-WEIXIN
        this.wechatMiniProgram = 1;
        //#endif
        //#ifdef H5
        this.h5 = 1;
        //#endif
        this.params = opiton;

        if (opiton.goods_type) {
            this.goods_type = opiton.goods_type;
        }
		
		if (opiton.tcType) {
		    this.tcType = opiton.tcType;
		}
		if (opiton.tcPrice) {
		    this.tcPrice = opiton.tcPrice;
		}
		if (opiton.cartFree) {
		    this.cartFree = opiton.cartFree;
		}
		
		console.log("初始化购物车数据"+this.cartFree);

        if (opiton.type == 1) {
            // 商品详情立即购买
            this.getpursure(opiton);
        } else if (opiton.type == 2) {
            // 购物车购买
            this.getcartsure(opiton);
        }
        cart_idresList = opiton;


        uni.setNavigationBarTitle({
            title: this.$t('立即结算')
        });

    },
    watch: {
        valShow() {
            /**
             * 更新页面状态 防止页面卡死
             */
            this.statusMath(this);
        }
    },
    onBackPress() {
        //
        if (this.valShow) {
            this.getnav("/pagesC/order/allOrder?backindex=2");
            return true;
        }
    },
    methods: {
        // 获取经纬度
        async getLonLat() {
    //         return new Promise((resolve) => {
    //             uni.getLocation({
    //                 type: 'gcj02',
    //                 geocode: true,
    //                 success({latitude, longitude}) {
    //                     resolve({latitude, longitude})
    //                 },
				// 	fail(error) {
				// 		// 适配H5
				// 		resolve({ latitude: null, longitude: null });
				// 	},
				// 	complete() {
				// 		// 适配H5
				// 		resolve({ latitude: null, longitude: null });
				// 	}
    //             })
				
    //         });
        },

        selectShop(shop) {
            this.selectShopInfo = shop;
            this.hidePopup();
            console.log(shop)
        },
        goodsTypeMethod(goods_type) {
            this.goods_type = goods_type;
            this.getpursure(this.params);
        },

        coupon(type, data) {
            if (type == 1) {
                // 优惠
                if (Number(data.youhui_price) <= 0) {
                }
            } else if (type == 2) {
                // 运费
                if (Number(data.freight) <= 0) {
                }
            }

            this.pop = type;
            this.infoCoupon = data || {};
            this.$refs.popupCopun.open();
            // console.log(infoCoupon);
        },
        /**
         *  // 购物车购买
         */
        async getcartsure(data) {
            const lonlat = await this.getLonLat();
            this.$http.getcartsure({
                cart_idres: data.cart_idres,
                goods_type: this.goods_type,
				tcType: this.tcType,
				tcPrice: this.tcPrice,
				cartFree: this.cartFree,
                ...lonlat
            }).then(res => {
                if (res.status == 200) {
                    this.cartsureInfo = res.data;
                    this.address = res.data.address;
                    this.goodinfo = res.data.goodinfo;
					
					console.log("打印购物车信息");
					console.log(this.goodinfo);
                }
            });
        },
        /**
         * // 商品详情立即购买
         */
        async getpursure(data) {
            const lonlat = await this.getLonLat();
            this.$http.getpursure({
                pur_id: data.pur_id,
                pin_number: data.pin_number,
                fangshi: data.fangshi,
                type: this.goods_type,
				tcType: this.tcType,
				tcPrice: this.tcPrice,
				cartFree: this.cartFree,
                ...lonlat
            })
                .then(res => {
                    if (res.status == 200) {
                        this.cartsureInfo = res.data || '';
                        this.address = res.data.address || '';
                        this.goodinfo = res.data.goodinfo || '';
                        this.is_mail = res.data.is_mail || 0;
						//0快递、1自提、2同城配送
						let checks = [...res.data.check[0]];
						if((checks.includes("0") && checks.includes("1")) || (checks.includes("2") && checks.includes("1"))){
							this.check = 1;
						}else if(checks.length==1 && checks.includes("1")){
							this.onlyType == 1;
						}else{
							this.check = 0;
						}
						console.log("this.check  "+this.check);
                        // this.check = res.data.check || 0;
                        // if (this.goods_type == 0) {
                        //     this.goods_type = res.data.is_mail == 1 ? 1 : res.data.check == 1 ? 2 : 1;
                        // }
						console.log("this.goods_type "+this.goods_type);

                    }
                });
        },
        /**
         * 获取支付订单数据
         *
         */
        orderInfo(typeIndex) {
			let newBeizhu = this.goodinfo.map(item => ({
			        did: item.dianpu_id,
			        bz: item.beizhu
			      }));
            let dataType = {
                dz_id: this.address.id,
                zf_type: typeIndex,
                goods_type: this.goods_type,
                username: this.username,
                phone: this.phone,
				//购物车包邮 参数传递
				tcType: this.tcType,
				tcPrice: this.tcPrice,
				cartFree: this.cartFree,
				//备注
				beizhu: newBeizhu
				
            };
            if (dataType.goods_type == 2 && !this.selectShopInfo) {
                this.$toast(this.$t('请选择自提点'));
                return;
            }
            if (this.selectShopInfo) {
                dataType.shop_storestaff_id = this.selectShopInfo.id;
            }

            return new Promise(reslove => {
                if (cart_idresList.type == 2) {
                    // 购物车创建订单
                    dataType.cart_idres = cart_idresList.cart_idres;
                    this.$http.getaddorderPay(dataType).then(res => {
                        if (res.status == 200) {
                            reslove(res);
                            this.$refs.payPop.payModel = true; // 弹出
                        } else {
                            this.$toast(this.$t(res.mess));
                        }
                    });
                } else if (cart_idresList.type == 1) {
                    // 立即购买创建订单
                    dataType.pur_id = cart_idresList.pur_id;
                    this.$http.getpuraddorderPay({
                        ...dataType,
                        fangshi: this.params.fangshi,
                        pin_number: this.params.pin_number,
                    })
                        .then(res => {
                            if (res.status == 200) {
                                reslove(res);
                                this.$refs.payPop.payModel = true; // 弹出
                            } else {
                                this.$toast(res.mess);
                            }
                        });
                }
            });
        },
        // 生成拉起支付的密钥
        payFall(paydata, zf_type) {
            let data = {
                order_number: paydata.data.order_number,
                zf_type: zf_type,
                wechat_miniprogram: this.wechatMiniProgram,
                h5: this.h5
            }
            if (this.wechatMiniProgram === 1) {
                data.xcx_openid = uni.getStorageSync('xcxOpenid')
            }
            return new Promise(resolve => {
                this.$http.getzhifu(data)
                    .then(res2 => {
                        if (res2.status == 200) {
                            resolve(res2);
                        }
                    }).catch((e) => {
                    console.log(3)
                });
            });
        },
        async submitOrder() {
            if (this.goods_type == 1) {
                if (this.address == "") {
                    return this.$toast(this.$t('请先添加收货地址'));
                }
				//同城商品需要判断用户切换城市和收货地址是否一致
				let userAddrCityCode = uni.getStorageSync("location").cityCode;
				let receAddrCityCode = this.address.city_code;
				console.log(uni.getStorageSync("location"))
				console.log(receAddrCityCode)
				if(receAddrCityCode == null || receAddrCityCode == undefined || receAddrCityCode == "" ){
					return this.$toast(this.$t('请重新填写收货地址！'));
				}
				if(userAddrCityCode == null || userAddrCityCode == undefined || userAddrCityCode == "" ){
					return this.$toast(this.$t('请重新获取定位！'));
				}
				if(this.tcType == 3 && userAddrCityCode.toString().slice(0,4) != receAddrCityCode.slice(0,4)){
					return this.$toast(this.$t('同城商品不支持异地购买！'));
				}
				// 同城商品需要判断是否在配送范围
				if(this.tcType == 3 && this.address.is_range != 1){
					return this.$toast(this.$t('收货地址不在配送范围！'));
				}
			
            } else if (this.goods_type == 2) {
                if (this.username == "" || this.phone == "") {
                    return this.$toast(this.$t('请填写联系人和电话'));
                }
            } else {
                return this.$toast(this.$t('提货方式错误'));
            }
            orderInfoData = await this.orderInfo();
        },

        async crosspay() {
            let ref = this.$refs.payPop

            if (this.cartsureInfo.ac_type == 2 && this.cartsureInfo.integral > 0 && parseFloat(this.cartsureInfo.zsprice) == 0) {
                ref.payType = 4
            }

            if (ref.payType == 5) { // 银行卡支付
                ref.orderNumber = orderInfoData.data.order_number
                ref.bankModel = true
                return
            } else if (ref.payType == 3 || ref.payType == 4) { // 余额支付、积分积分
                ref.orderNumber = orderInfoData.data.order_number
                ref.hasPayPwd()
            } else { // 支付宝、微信支付
                const temp = await this.payFall(orderInfoData, ref.payType);
                ref.payinfos = await temp.data.infos
                ref.crosspay()
            }
			this.$refs.payPop.payModel = false; // 收起

            this.$hideLoading()
        },

        hidePopup() {
            this.$refs.popupCopun.close(); // 关闭
        },
		
	
		hidePopup2() {
		    // this.$emit('update:bzDesc', this.bzDesc);
		    this.$refs.popupCopun.close(); // 关闭
		}

    }
};
</script>

<style lang="scss" scoped>
@import '~uview-ui/index.scss';

.fresh-name {
  display: flex;
  align-items: center;
}

.goods_type {
  flex-direction: row;
  justify-content: center;
  display: flex;

  .goods_type_title {
    width: 50%;
    font-size: 30 upx;
    height: 85 upx;
    line-height: 80 upx;
    text-align: center;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    display: flex;

    .goods_type_name {
      width: 100%;
    }

    .active {
      color: #e7512b;
    }

    .goods_type_active {
      height: 5 upx;
      background-color: #e7512b;
      width: 100 upx;
    }
  }
}

.order_list {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20 rpx 0;

  .juan {
    display: flex;

    text {
      font-size: 28 rpx;
      color: #303133;

      &:nth-child(1) {
        font-weight: 500;
      }
    ;

      &:nth-child(2),
      &:nth-child(3) {
        color: #606266;
      }
    }

    .color {
      color: #f44336;
    }
  }

  .order_color {
    font-size: 26 rpx;
    color: #333;
  }
}

.money {
  padding-left: 20 upx;
  font-size: 24 upx;
  color: #999;
}

.icon_e712 {
  text-align: center;
  font-size: 45 upx;
}

.cuxiao {
  margin-bottom: 40 upx;
}

.tip {
  align-items: center;
  height: 98 upx;
  padding: 0 30 upx;
  color: #ed6a0c;
  background: #fffbe8;
  font-size: 26 upx;

  i {
    padding-right: 10 upx;
  }
}

.adds_list view {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.phone {
  display: flex;
  align-items: center;
  padding: 0 30 upx;

  .tap_address {
    flex: 1;
    padding: 0 10 upx;
  }

  .phone-iconfont {
    position: static !important;
    padding-right: 0;
    width: auto !important;
    margin: 0;
    padding: 0 !important;
  }
}

.amountFooter {
  display: flex;
  position: fixed;
  bottom: 0;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  background-color: #fff;
  padding: 12 upx 30 upx;

  .left {
    color: tomato;

    .price {
      font-size: 48 upx;
      font-weight: bold;
    }
  }
}

.u-p-30 {
  padding: 30 upx
}

.payWrap {
  .title {
    text-align: center;
  }

  .money {
    font-weight: bold;
    font-size: 52 upx;
    color: red;
    text-align: center;
    margin: 40 upx 0;
  }

  .item {
    padding: 20 upx 0;

  }
}

//备注样式
.input-text {
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 8px;
  height: 400rpx;
  width: 90%; /* 或者具体的宽度值 */
}

#ellipsis-text {
  //width: 220px; /* 设置一个固定宽度，根据需要调整 */
  white-space: nowrap; /* 防止文本换行 */
  overflow: hidden; /* 隐藏超出宽度的内容 */
  text-overflow: ellipsis; /* 添加省略号 */
  text-align: right;
}

.bztx {
	font-size: 26rpx;
}

.cfree {
	font-size: 23rpx;
	color: #e7512b;
}

.text-box {
  display: flex;
  align-items: center;
  width: 85%;
}

.text-box input {
  flex: 1;
  padding: 8px;
  border-radius: 4px;
  font-size: 14px;
  overflow: hidden; /* 隐藏超出的内容 */
  text-overflow: ellipsis; /* 文本超出时显示省略号 */
  white-space: nowrap; /* 不换行 */
}

.text-box input::placeholder {
  color: #999;
}
</style>
